<section class="orders">
<div class="checkout-info">
    <span class="addr-icon"></span>
    <div class="address-info">
        <p class="addr-header">收货人信息: </p>
        <div class="">{{order.address.receiver}}</div>
        <div class="">{{order.address.street1}}</div>
        <div class="">{{order.address.street2}}</div>
        <div class="">{{order.address.city}}, {{order.address.state}}</div>
        <div class="">{{order.address.country}}, {{order.address.postcode}}</div>
    </div>
</div>
</section>

<section class="clearfix" ng-cloak>
<div class="">
    <table class="table ngCart cart-table">
        <tbody>
        <tr ng-repeat="entry in order.entries track by $index">
            <td class="img-cell">
                <div>
                    <img ng-src="{{entry.spec.images[0]}}">
                </div>
            </td>
            <td class="info-cell">
                <div>{{ entry.item.title }}</div>
                <div>
                    <span ng-repeat="(k, v) in entry.spec.attributes">
                        {{ngCart.attrMap[k]}}: {{v}}
                    </span>
                </div>
                <div class="btn-group cart-btn">
                    <span>数量: {{ entry.quantity | number }}</span>
                </div>
            </td>
            <td class="price-cell">{{ entry.amount_usd | currency }}</td>
        </tr>
    </table>
</div>
</section>
<section>
<div class="checkout-info">
    <div class="icon partner-icon address"></div>
    <div class="partner-info">
        <div class="selected-partner">{{order.provider.display_name}} ({{order.provider.service_intro.duration}}):
            <span class="detail-price pull-right">{{order.cn_shipping | currency }}</span>
        </div>
    </div>
</div>
</section>

<section>
<div class="checkout-info">
    <div class="icon coupon-icon address"></div>
    <div class="coupon-info">
        <div ng-show="order.discount.length==1" class="">{{order.discount[0].desc}}
            <span class="detail-price pull-right">- {{order.discount[0].value | currency }}</span>
        </div>
        <div ng-show="order.discount.length==0" class="">
            不使用
        </div>
    </div>
</div>
</section>


<section>
<div class="checkout-info">
    <div class="item-info-table">
        <dl class="item-info-field">
            <dt class="">商品总价: </dt>
            <dd class="detail-price">{{order.amount_usd | currency }}</dd>
        </dl>
        <dl class="item-info-field">
            <dt class="">运费: </dt>
            <dd class="detail-price">{{order.cn_shipping | currency }}</dd>
        </dl>
        <dl class="item-info-field">
            <dt class="">税费: </dt>
            <dd class="detail-price">0</dd>
        </dl>
    </div>

</div>
<div class="order-bottom">
    <span class="">
        订单号：{{order.short_id}}
    </span>
    <span class="pull-right">
        <a ng-show="order.payment_status == 'PAID'"
            class="logistic-btn"
            href="/#/order/logistics/{{order.id}}">
            查看物流
        </a>
        <div class="pull-right"
            ng-show="order.payment_status=='UNPAID'"
            ng-click="cancelOrder()"><a class="">取消订单</a>
        </div>
    </span>
</div>
</section>

<footer class="view-footer">
    <div class="footer-wrapper wrapper">
        <div class="footer-text">总额（实际支付费用）: </div>
        <div class="footer-price">{{  order.final| currency }}</div>
        <button class="btn add-cart-btn" ng-show="order.payment_status=='UNPAID'"
            ng-click="goCheckout(order.id)">去付款</button>
        <button class="btn btn-empty" ng-disabled="order.payment_status=='PAID'"
            ng-show="order.payment_status=='PAID'">
            已付款
        </button>
    </div>
</footer>
